/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author plr
 */
@Entity
@Table(name = "USED_TIME")
@NamedQueries({
    @NamedQuery(name = "UsedTime.findAll", query = "SELECT u FROM UsedTime u"),
    @NamedQuery(name = "UsedTime.findById", query = "SELECT u FROM UsedTime u WHERE u.id = :id"),
    @NamedQuery(name = "UsedTime.findByDia", query = "SELECT u FROM UsedTime u WHERE u.dia = :dia"),
    @NamedQuery(name = "UsedTime.findByRegIni", query = "SELECT u FROM UsedTime u WHERE u.regIni = :regIni"),
    @NamedQuery(name = "UsedTime.findByRegFin", query = "SELECT u FROM UsedTime u WHERE u.regFin = :regFin"),
    @NamedQuery(name = "UsedTime.findByRegInter", query = "SELECT u FROM UsedTime u WHERE u.regInter = :regInter"),
    @NamedQuery(name = "UsedTime.findByServicio", query = "SELECT u FROM UsedTime u WHERE u.servicio = :servicio"),
    @NamedQuery(name = "UsedTime.findByTarea", query = "SELECT u FROM UsedTime u WHERE u.tarea = :tarea"),
    @NamedQuery(name = "UsedTime.findByUbic", query = "SELECT u FROM UsedTime u WHERE u.ubic = :ubic"),
    @NamedQuery(name = "UsedTime.findByEsFact", query = "SELECT u FROM UsedTime u WHERE u.esFact = :esFact"),
    @NamedQuery(name = "UsedTime.findByTipoHora", query = "SELECT u FROM UsedTime u WHERE u.tipoHora = :tipoHora"),
    @NamedQuery(name = "UsedTime.findByDescrip", query = "SELECT u FROM UsedTime u WHERE u.descrip = :descrip"),
    @NamedQuery(name = "UsedTime.findByComentario", query = "SELECT u FROM UsedTime u WHERE u.comentario = :comentario")})
public class UsedTime implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private String id;
    @Basic(optional = false)
    @Column(name = "DIA")
    @Temporal(TemporalType.DATE)
    private Date dia;
    @Column(name = "REG_INI")
    @Temporal(TemporalType.TIME)
    private Date regIni;
    @Column(name = "REG_FIN")
    @Temporal(TemporalType.TIME)
    private Date regFin;
    @Column(name = "REG_INTER")
    @Temporal(TemporalType.TIME)
    private Date regInter;
    @Column(name = "SERVICIO")
    private String servicio;
    @Column(name = "TAREA")
    private String tarea;
    @Column(name = "UBIC")
    private String ubic;
    @Column(name = "ES_FACT")
    private Character esFact;
    @Column(name = "TIPO_HORA")
    private Character tipoHora;
    @Basic(optional = false)
    @Column(name = "DESCRIP")
    private String descrip;
    @Column(name = "COMENTARIO")
    private String comentario;

    public UsedTime() {
    }

    public UsedTime(String id) {
        this.id = id;
    }

    public UsedTime(String id, Date dia, String descrip) {
        this.id = id;
        this.dia = dia;
        this.descrip = descrip;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getDia() {
        return dia;
    }

    public void setDia(Date dia) {
        this.dia = dia;
    }

    public Date getRegIni() {
        return regIni;
    }

    public void setRegIni(Date regIni) {
        this.regIni = regIni;
    }

    public Date getRegFin() {
        return regFin;
    }

    public void setRegFin(Date regFin) {
        this.regFin = regFin;
    }

    public Date getRegInter() {
        return regInter;
    }

    public void setRegInter(Date regInter) {
        this.regInter = regInter;
    }

    public String getServicio() {
        return servicio;
    }

    public void setServicio(String servicio) {
        this.servicio = servicio;
    }

    public String getTarea() {
        return tarea;
    }

    public void setTarea(String tarea) {
        this.tarea = tarea;
    }

    public String getUbic() {
        return ubic;
    }

    public void setUbic(String ubic) {
        this.ubic = ubic;
    }

    public Character getEsFact() {
        return esFact;
    }

    public void setEsFact(Character esFact) {
        this.esFact = esFact;
    }

    public Character getTipoHora() {
        return tipoHora;
    }

    public void setTipoHora(Character tipoHora) {
        this.tipoHora = tipoHora;
    }

    public String getDescrip() {
        return descrip;
    }

    public void setDescrip(String descrip) {
        this.descrip = descrip;
    }

    public String getComentario() {
        return comentario;
    }

    public void setComentario(String comentario) {
        this.comentario = comentario;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof UsedTime)) {
            return false;
        }
        UsedTime other = (UsedTime) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.entities.UsedTime[id=" + id + "]";
    }

}
